package com.lengxf.aPlugins.model;


import lombok.Data;

import java.util.List;
import java.util.stream.Collectors;

@Data
public class WriteExcelModel implements ModelInterface {

    private String areaEn;

    private String area;

    private List<MetaDataModel> infoList;


    @Override
    public String getAreaEn() {
        return areaEn;
    }

    @Override
    public String getArea() {
        return area;
    }

    @Override
    public List<MetaDataModel> getInfoList() {
        return infoList;
    }

    public void buildInfoList(List<ReadExcelModel> list) {
        this.infoList = list.stream().map(e -> {
            MetaDataModel metaDataModel = new MetaDataModel();
            metaDataModel.setQueueName(e.getQueueName());
            metaDataModel.setKeoServerPrefix(e.getKeoServerPrefix());
            metaDataModel.setBizType(e.getBizEnums());
            return metaDataModel;
        }).collect(Collectors.toList());
    }
}
